
package com.cbwl.eoas.cms.model.sysconfig;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import com.cbwl.eoas.common.base.CommonBean;

/**
 * 
 * <p>[描述信息：说明类的基本功能]</p>
 *
 * @author 虞云波 - yuyunbo@3856.cc
 * @version 1.0 Created on 2017年10月20日 下午5:26:32
 */
public class SysUserResourceDTO extends CommonBean {

	

	

	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 8916629622192342572L;
	private java.lang.Long id;
	@NotNull 
	private java.lang.Long uid;
	@NotNull 
	private java.lang.Long rid;
	@NotNull @Max(127)
	private Integer type;
	//columns END

	
	public void setId(java.lang.Long value) {
		this.id = value;
	}
	
	public java.lang.Long getId() {
		return this.id;
	}
	
	public void setUid(java.lang.Long value) {
		this.uid = value;
	}
	
	public java.lang.Long getUid() {
		return this.uid;
	}
	
	public void setRid(java.lang.Long value) {
		this.rid = value;
	}
	
	public java.lang.Long getRid() {
		return this.rid;
	}
	
	public void setType(Integer value) {
		this.type = value;
	}
	
	public Integer getType() {
		return this.type;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("Uid",getUid())
			.append("Rid",getRid())
			.append("Type",getType())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof SysUserResourceDTO == false){return false;}
		if(this == obj){return true;}
		SysUserResourceDTO other = (SysUserResourceDTO)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

